jBGallery.Interface = function(el, data, options){
  
  if(options.randomize > 0)
     options.current = jBGallery.Randomizer(options.current, data.length());
  
  var _css = options.style;
  if (options.webkit)
      _css = '';
    
  var _image = '<img style="visibility:hidden" class="' + _css + ' jbgallery-target" alt="' + data.get(options.current).title + '" src="' + data.get(options.current).href + '" />';
    var _html = '<div class="jbg-wrap ' + options.style + '"><table cellpadding="0" cellspacing="0"><tr><td>' + _image + '</td></tr></table></div>';
    var _caption = '<div class="jbg-caption" style="display:none"></div>';
    var _loading = '<div class="jbg-loading"><span class="jbg-loading"></span></div>';
  
  //hide
    $(el).hide().find("ul").hide();
    
    //$("#jbgallery-css").attr("media","screen");
  
  if (options.fullscreen) {
    $("html, body").addClass("jbg-body");
  } else {
    $(el).addClass("jbox");
  }
  
    if(options.ie6)
        $("html").addClass("ie6");

    
  
    $(el)
    .prepend(_html)
    .prepend(_caption)
  .prepend(_loading);//jbox mod
    
    //first
    var _img = new Image();
    _img.onload = function(){
    $('.jbgallery-target',el).hide().css("visibility", "").fadeIn(options.timers.fade);
    };
  _img.src = data.get(options.current).href;

};
